﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Irandeb4.Models
{
    public class Employee
    {
        [ScaffoldColumn(false)]
        public int EmployeeId { get; set; }

        [Required(ErrorMessage = "por favor introduzca un CI")]
        [StringLength(9, MinimumLength = 6, ErrorMessage = "el CI debe tener minimo 6 digitos y maximo 9")]
        [RegularExpression(@"^[0-9]{0,100}", ErrorMessage = "El CI solo permite numeros")]
        public string Ci { get; set; }

        [Required(ErrorMessage = "por favor introduzca un nombre")]
        [StringLength(30, MinimumLength = 3, ErrorMessage = "el nombre debe ser de minimo 3 cararteres y maximo 30")]
        public string Names { get; set; }

        [Required(ErrorMessage = "por favor introduzca los apellidos")]
        [StringLength(30, MinimumLength = 3, ErrorMessage = "el apellido debe ser de minimo 3 cararteres y maximo 30")]
        public string Surnames { get; set; }

        [Required(ErrorMessage = "por favor introduzca un email")]
        [StringLength(30, MinimumLength = 5, ErrorMessage = "el email debe ser de minimo 5 cararteres y maximo 30")]
        [RegularExpression(".+\\@.+\\..+", ErrorMessage = "por favor introduzca un email valido")]
        public string Email { get; set; }

        [StringLength(20, MinimumLength = 7, ErrorMessage = "el telefono debe ser de minimo 7 cararteres y maximo 20")]
        public string Cellphone { get; set; }

        [StringLength(80, MinimumLength = 5, ErrorMessage = "la direccion debe ser de minimo 5 cararteres y maximo 80")]
        public string Address { get; set; }

        [StringLength(25, MinimumLength = 3, ErrorMessage = "el cargo debe ser de minimo 3 cararteres y maximo 25")]
        public string Position { get; set; }
    }
}